package niit.group5.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;

public class GameLoader extends Activity {
	private Handler handler;
	public static boolean isGameOver = false;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		/* Load level 1 */
		Level1 lv1 = new Level1(this);
		setContentView(lv1);
		handler = new Handler();
		handler.post(new Runnable() {
			@Override
			public void run() {
				// TODO Auto-generated method stub
				if (isGameOver == true) {
					// lv1.d
					finish();
					startActivity(new Intent(getBaseContext(),
							GameOverScr.class));
					
				}
			}
		});
	}
}
